Dp and qp based decision and planning for autonomous driving vehicles

ABSTRACT

According to some embodiments, a system calculates a first trajectory based on a map and a route information. The system generates a path profile based on the first trajectory, traffic rules, and an obstacle information describing one or more obstacles perceived by the ADV. The system generates a speed profile based on the path profile, where the speed profile includes, for each of the obstacles, a decision to yield or overtake the obstacle. The system performs a quadratic programming optimization on the path profile and the speed profile to identify an optimal path with optimal speeds. The system generates a second trajectory based on the optimal path and optimal speeds to control the ADV autonomously according to the second trajectory.

RELATED APPLICATIONS

This application is related to co-pending U.S. Patent application No.______, entitled “Dynamic Programming and Gradient Descent BasedDecision and Planning for Autonomous Driving Vehicles,” filed ______,2017, Atty. Docket No. 9922P112, and co-pending U.S. Patent applicationNo. ______, entitled “Cost Based Path Planning for Autonomous DrivingVehicles,” filed ______, 2017, Atty. Docket No. 9922P113. The disclosureof the above applications is incorporated by reference herein in itsentirety.

TECHNICAL FIELD

Embodiments of the present disclosure relate generally to operatingautonomous vehicles. More particularly, embodiments of the disclosurerelate to dynamic programming (DP) and quadratic programming (QP) baseddecision and planning for autonomous driving vehicles (ADVs).

BACKGROUND

Vehicles operating in an autonomous mode (e.g., driverless) can relieveoccupants, especially the driver, from some driving-relatedresponsibilities. When operating in an autonomous mode, the vehicle cannavigate to various locations using onboard sensors, allowing thevehicle to travel with minimal human interaction or in some caseswithout any passengers.

Motion planning and control are critical operations in autonomousdriving. However, they can be open-ended and can be difficult tooptimize without some initial constraints. Furthermore, motion planningand control is applied to all types of vehicles, which may not beaccurate and smooth under some circumstances.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the disclosure are illustrated by way of example and notlimitation in the figures of the accompanying drawings in which likereferences indicate similar elements.

FIG. 1 is a block diagram illustrating a networked system according toone embodiment.

FIG. 2 is a block diagram illustrating an example of an autonomousvehicle according to one embodiment.

FIGS. 3A-3B are block diagrams illustrating an example of a perceptionand planning system used with an autonomous vehicle according to oneembodiment.

FIG. 4 is a block diagram illustrating an example of a decision and aplanning processes according to one embodiment.

FIG. 5A is a block diagram illustrating an example of a decision moduleaccording to one embodiment.

FIG. 5B is a block diagram illustrating an example of a planning moduleaccording to one embodiment.

FIG. 6 is a block diagram illustrating a station-lateral map accordingto one embodiment.

FIGS. 7A-7B are block diagrams illustrating station-time maps accordingto some embodiments.

FIG. 8 is a flow diagram illustrating a method according to oneembodiment.

FIG. 9 is a block diagram illustrating an example of a planning moduleaccording to one embodiment.

FIG. 10 is a flow diagram illustrating a method according to oneembodiment.

FIG. 11 is a block diagram illustrating an example of a planning moduleaccording to one embodiment.

FIGS. 12A-12B are block diagrams illustrating a path costs module and aspeed costs module respectively according to one embodiment.

FIG. 13 is a flow diagram illustrating a method according to oneembodiment.

FIG. 14A is a flow diagram illustrating a method according to oneembodiment.

FIG. 14B is a flow diagram illustrating a method according to oneembodiment.

FIG. 15 is a block diagram illustrating a data processing systemaccording to one embodiment.

DETAILED DESCRIPTION

Various embodiments and aspects of the disclosures will be describedwith reference to details discussed below, and the accompanying drawingswill illustrate the various embodiments. The following description anddrawings are illustrative of the disclosure and are not to be construedas limiting the disclosure. Numerous specific details are described toprovide a thorough understanding of various embodiments of the presentdisclosure. However, in certain instances, well-known or conventionaldetails are not described in order to provide a concise discussion ofembodiments of the present disclosures.

Reference in the specification to “one embodiment” or “an embodiment”means that a particular feature, structure, or characteristic describedin conjunction with the embodiment can be included in at least oneembodiment of the disclosure. The appearances of the phrase “in oneembodiment” in various places in the specification do not necessarilyall refer to the same embodiment.

According to some embodiments, an ADV includes a decision and planningsystem to control the ADV autonomously. Based on a start and an endlocations, the system queries a routing service for reference routes andcalculates a reference line to drive the ADV from the start to endlocations. Based on perceived obstacles surrounding the ADV and traffic,the system determines path and speed decisions to ignore, pass, yield,or overtake the obstacles in view of traffic rules and/or status of theADV. The system optimizes one or more reference lines based on the pathsand speeds decisions as trajectories to plan when and where the carshould be at a particular point in time.

According to one aspect, a system calculates a first trajectory based ona map and a route information. The system generates a path profile basedon the first trajectory, traffic rules, and an obstacle informationdescribing one or more obstacles perceived by the ADV. The systemgenerates a speed profile based on the path profile, where the speedprofile includes, for each of the obstacles, a decision to yield orovertake the obstacle. The system performs a quadratic programmingoptimization on the path profile and the speed profile to identify anoptimal path with optimal speed and generates a second trajectory basedon the optimal path and optimal speeds such that the ADV can becontrolled autonomously based on the second trajectory. The secondtrajectory represents the optimized first trajectory using quadraticprogramming optimization.

According to another aspect, a system calculates a first trajectorybased on a map and a route information. The system generates a pathprofile based on the first trajectory, traffic rules, and an obstacleinformation describing one or more obstacles perceived by the ADV, wherefor each of the obstacles, the path profile includes a decision to yieldor nudge to left or right of the obstacle. The system generates a speedprofile based on the path profile in view of the traffic rules. Thesystem performs a gradient descent optimization based on the pathprofile and the speed profile to generate a second trajectoryrepresenting an optimized first trajectory and controls the ADVaccording to the second trajectory.

According to a further aspect, a system generates a number of possibledecisions for routing the ADV from a first location to a second locationbased on perception information perceiving a driving environmentsurrounding the ADV, including one or more obstacles in view of a set oftraffic rules. The system calculates a number of trajectories based on acombination of one or more of the possible decisions. The systemcalculates a total cost for each of the trajectories using a number ofcost functions and selects one of the trajectories with a minimum totalcost as the driving trajectory to control the ADV autonomously. The costfunctions include a path cost function, a speed cost function, and anobstacle cost function.

FIG. 1 is a block diagram illustrating an autonomous vehicle networkconfiguration according to one embodiment of the disclosure. Referringto FIG. 1, network configuration 100 includes autonomous vehicle 101that may be communicatively coupled to one or more servers 103-104 overa network 102. Although there is one autonomous vehicle shown, multipleautonomous vehicles can be coupled to each other and/or coupled toservers 103-104 over network 102. Network 102 may be any type ofnetworks such as a local area network (LAN), a wide area network (WAN)such as the Internet, a cellular network, a satellite network, or acombination thereof, wired or wireless. Server(s) 103-104 may be anykind of servers or a cluster of servers, such as Web or cloud servers,application servers, backend servers, or a combination thereof. Servers103-104 may be data analytics servers, content servers, trafficinformation servers, map and point of interest (MPOI) severs, orlocation servers, etc.

An autonomous vehicle refers to a vehicle that can be configured to inan autonomous mode in which the vehicle navigates through an environmentwith little or no input from a driver. Such an autonomous vehicle caninclude a sensor system having one or more sensors that are configuredto detect information about the environment in which the vehicleoperates. The vehicle and its associated controller(s) use the detectedinformation to navigate through the environment. Autonomous vehicle 101can operate in a manual mode, a full autonomous mode, or a partialautonomous mode.

In one embodiment, autonomous vehicle 101 includes, but is not limitedto, perception and planning system 110, vehicle control system 111,wireless communication system 112, user interface system 113, and sensorsystem 115. Autonomous vehicle 101 may further include certain commoncomponents included in ordinary vehicles, such as, an engine, wheels,steering wheel, transmission, etc., which may be controlled by vehiclecontrol system 111 and/or perception and planning system 110 using avariety of communication signals and/or commands, such as, for example,acceleration signals or commands, deceleration signals or commands,steering signals or commands, braking signals or commands, etc.

Components 110-115 may be communicatively coupled to each other via aninterconnect, a bus, a network, or a combination thereof. For example,components 110-115 may be communicatively coupled to each other via acontroller area network (CAN) bus. A CAN bus is a vehicle bus standarddesigned to allow microcontrollers and devices to communicate with eachother in applications without a host computer. It is a message-basedprotocol, designed originally for multiplex electrical wiring withinautomobiles, but is also used in many other contexts.

Referring now to FIG. 2, in one embodiment, sensor system 115 includes,but it is not limited to, one or more cameras 211, global positioningsystem (GPS) unit 212, inertial measurement unit (IMU) 213, radar unit214, and a light detection and range (LIDAR) unit 215. GPS system 212may include a transceiver operable to provide information regarding theposition of the autonomous vehicle. IMU unit 213 may sense position andorientation changes of the autonomous vehicle based on inertialacceleration. Radar unit 214 may represent a system that utilizes radiosignals to sense objects within the local environment of the autonomousvehicle. In some embodiments, in addition to sensing objects, radar unit214 may additionally sense the speed and/or heading of the objects.LIDAR unit 215 may sense objects in the environment in which theautonomous vehicle is located using lasers. LIDAR unit 215 could includeone or more laser sources, a laser scanner, and one or more detectors,among other system components. Cameras 211 may include one or moredevices to capture images of the environment surrounding the autonomousvehicle. Cameras 211 may be still cameras and/or video cameras. A cameramay be mechanically movable, for example, by mounting the camera on arotating and/or tilting a platform.

Sensor system 115 may further include other sensors, such as, a sonarsensor, an infrared sensor, a steering sensor, a throttle sensor, abraking sensor, and an audio sensor (e.g., microphone). An audio sensormay be configured to capture sound from the environment surrounding theautonomous vehicle. A steering sensor may be configured to sense thesteering angle of a steering wheel, wheels of the vehicle, or acombination thereof. A throttle sensor and a braking sensor sense thethrottle position and braking position of the vehicle, respectively. Insome situations, a throttle sensor and a braking sensor may beintegrated as an integrated throttle/braking sensor.

In one embodiment, vehicle control system 111 includes, but is notlimited to, steering unit 201, throttle unit 202 (also referred to as anacceleration unit), and braking unit 203. Steering unit 201 is to adjustthe direction or heading of the vehicle. Throttle unit 202 is to controlthe speed of the motor or engine that in turn control the speed andacceleration of the vehicle. Braking unit 203 is to decelerate thevehicle by providing friction to slow the wheels or tires of thevehicle. Note that the components as shown in FIG. 2 may be implementedin hardware, software, or a combination thereof.

Referring back to FIG. 1, wireless communication system 112 is to allowcommunication between autonomous vehicle 101 and external systems, suchas devices, sensors, other vehicles, etc. For example, wirelesscommunication system 112 can wirelessly communicate with one or moredevices directly or via a communication network, such as servers 103-104over network 102. Wireless communication system 112 can use any cellularcommunication network or a wireless local area network (WLAN), e.g.,using WiFi to communicate with another component or system. Wirelesscommunication system 112 could communicate directly with a device (e.g.,a mobile device of a passenger, a display device, a speaker withinvehicle 101), for example, using an infrared link, Bluetooth, etc. Userinterface system 113 may be part of peripheral devices implementedwithin vehicle 101 including, for example, a keyword, a touch screendisplay device, a microphone, and a speaker, etc.

Some or all of the functions of autonomous vehicle 101 may be controlledor managed by perception and planning system 110, especially whenoperating in an autonomous driving mode. Perception and planning system110 includes the necessary hardware (e.g., processor(s), memory,storage) and software (e.g., operating system, planning and routingprograms) to receive information from sensor system 115, control system111, wireless communication system 112, and/or user interface system113, process the received information, plan a route or path from astarting point to a destination point, and then drive vehicle 101 basedon the planning and control information. Alternatively, perception andplanning system 110 may be integrated with vehicle control system 111.

For example, a user as a passenger may specify a starting location and adestination of a trip, for example, via a user interface. Perception andplanning system 110 obtains the trip related data. For example,perception and planning system 110 may obtain location and routeinformation from an MPOI server, which may be a part of servers 103-104.The location server provides location services and the MPOI serverprovides map services and the POIs of certain locations. Alternatively,such location and MPOI information may be cached locally in a persistentstorage device of perception and planning system 110.

While autonomous vehicle 101 is moving along the route, perception andplanning system 110 may also obtain real-time traffic information from atraffic information system or server (TIS). Note that servers 103-104may be operated by a third party entity. Alternatively, thefunctionalities of servers 103-104 may be integrated with perception andplanning system 110. Based on the real-time traffic information, MPOIinformation, and location information, as well as real-time localenvironment data detected or sensed by sensor system 115 (e.g.,obstacles, objects, nearby vehicles), perception and planning system 110can plan an optimal route and drive vehicle 101, for example, viacontrol system 111, according to the planned route to reach thespecified destination safely and efficiently.

Server 103 may be a data analytics system to perform data analyticsservices for a variety of clients. In one embodiment, data analyticssystem 103 includes data collector 121 and machine learning engine 122.Data collector 121 collects driving statistics 123 from a variety ofvehicles, either autonomous vehicles or regular vehicles driven by humandrivers. Driving statistics 123 include information indicating thedriving commands (e.g., throttle, brake, steering commands) issued andresponses of the vehicles (e.g., speeds, accelerations, decelerations,directions) captured by sensors of the vehicles at different points intime. Driving statistics 123 may further include information describingthe driving environments at different points in time, such as, forexample, routes (including starting and destination locations), MPOIs,road conditions, weather conditions, etc.

Based on driving statistics 123, machine learning engine 122 generatesor trains a set of rules, algorithms, and/or predictive models 124 for avariety of purposes. For example, server 103 may include routing service125 to provide a routing service (e.g., routes and map information) toADV 101. ADV 101 can request for reference routes from routing service125 by indicating a start and an end location (e.g., an ideal routewithout obstacle information or traffic condition). Routing service 125then returns the requested routes. In one embodiment, returningreference routes can include returning one or more tables such as areference points table and a road segments/lanes table. Alternatively,the route and map information can be downloaded and cached in thevehicles, which can be used at real-time.

Server 103 can generate reference routes, for example, machine learningengine 122 can generate reference routes from map information such asinformation of road segments, vehicular lanes of road segments, anddistances from lanes to curb. For example, a road can be divided intosections or segments {A, B, and C} to denote three road segments. Threelanes of road segment A can be enumerated {A1, A2, and A3}. A referenceroute is generated by generating reference points along the referenceroute. For example, for a vehicular lane, machine-learning engine 122can connect midpoints of two opposing curbs or extremities of thevehicular lane provided by a map data. Based on the midpoints andmachine learning data representing collected data points of vehiclespreviously driven on the vehicular lane at different points in time,engine 122 can calculate the reference points by selecting a subset ofthe collected data points within a predetermined proximity of thevehicular lane and applying a smoothing function to the midpoints inview of the subset of collected data points.

Based on reference points or lane reference points, an ADV receiving thereference points may generate a reference line by interpolating thereference points such that the generated reference line is used as areference line for controlling ADVs on the vehicular lane. In someembodiments, a reference points table and a road segments tablerepresenting the reference lines are downloaded in real-time to ADVssuch that the ADVs can generate reference lines based on the ADVs'geographical location and driving direction. For example, in oneembodiment, an ADV can generate a reference line by requesting routingservice for a path segment by a path segment identifier representing anupcoming road section ahead and/or based on the ADV's GPS location.Based on a path segment identifier, a routing service can return to theADV reference points table containing reference points for all lanes ofroad segments of interest. ADV can look up reference points for a lanefor a path segment to generate a reference line for controlling the ADVon the vehicular lane. Note that the above process is performed offlineby the analytics server 103, where the reference points of routes aredetermined based on the route and map information. However, the samedata can be dynamically determined within each individual vehicle atreal-time, which will be described in details further below.

FIGS. 3A and 3B are block diagrams illustrating an example of aperception and planning system used with an autonomous vehicle accordingto one embodiment. System 300 may be implemented as a part of autonomousvehicle 101 of FIG. 1 including, but is not limited to, perception andplanning system 110, control system 111, and sensor system 115.Referring to FIGS. 3A-3B, perception and planning system 110 includes,but is not limited to, localization module 301, perception module 302,prediction module 303, decision module 304, planning module 305, controlmodule 306, and routing module 307.

Some or all of modules 301-307 may be implemented in software, hardware,or a combination thereof. For example, these modules may be installed inpersistent storage device 352, loaded into memory 351, and executed byone or more processors (not shown). Note that some or all of thesemodules may be communicatively coupled to or integrated with some or allmodules of vehicle control system 111 of FIG. 2. Some of modules 301-307may be integrated together as an integrated module. For example,decision module 304 and planning module 305 may be integrated as asingle module.

Localization module 301 determines a current location of autonomousvehicle 300 (e.g., leveraging GPS unit 212) and manages any data relatedto a trip or route of a user. Localization module 301 (also referred toas a map and route module) manages any data related to a trip or routeof a user. A user may log in and specify a starting location and adestination of a trip, for example, via a user interface. Localizationmodule 301 communicates with other components of autonomous vehicle 300,such as map and route information 311, to obtain the trip related data.For example, localization module 301 may obtain location and routeinformation from a location server and a map and POI (MPOI) server. Alocation server provides location services and an MPOI server providesmap services and the POIs of certain locations, which may be cached aspart of map and route information 311. While autonomous vehicle 300 ismoving along the route, localization module 301 may also obtainreal-time traffic information from a traffic information system orserver.

Based on the sensor data provided by sensor system 115 and localizationinformation obtained by localization module 301, a perception of thesurrounding environment is determined by perception module 302. Theperception information may represent what an ordinary driver wouldperceive surrounding a vehicle in which the driver is driving. Theperception can include the lane configuration (e.g., straight or curvelanes), traffic light signals, a relative position of another vehicle, apedestrian, a building, crosswalk, or other traffic related signs (e.g.,stop signs, yield signs), etc., for example, in a form of an object.

Perception module 302 may include a computer vision system orfunctionalities of a computer vision system to process and analyzeimages captured by one or more cameras in order to identify objectsand/or features in the environment of autonomous vehicle. The objectscan include traffic signals, road way boundaries, other vehicles,pedestrians, and/or obstacles, etc. The computer vision system may usean object recognition algorithm, video tracking, and other computervision techniques. In some embodiments, the computer vision system canmap an environment, track objects, and estimate the speed of objects,etc. Perception module 302 can also detect objects based on othersensors data provided by other sensors such as a radar and/or LIDAR.

For each of the objects, prediction module 303 predicts what the objectwill behave under the circumstances. The prediction is performed basedon the perception data perceiving the driving environment at the pointin time in view of a set of map/rout information 311 and traffic rules312. For example, if the object is a vehicle at an opposing directionand the current driving environment includes an intersection, predictionmodule 303 will predict whether the vehicle will likely move straightforward or make a turn. If the perception data indicates that theintersection has no traffic light, prediction module 303 may predictthat the vehicle may have to fully stop prior to enter the intersection.If the perception data indicates that the vehicle is currently at aleft-turn only lane or a right-turn only lane, prediction module 303 maypredict that the vehicle will more likely make a left turn or right turnrespectively.

For each of the objects, decision module 304 makes a decision regardinghow to handle the object. For example, for a particular object (e.g.,another vehicle in a crossing route) as well as its metadata describingthe object (e.g., a speed, direction, turning angle), decision module304 decides how to encounter the object (e.g., overtake, yield, stop,pass). Decision module 304 may make such decisions according to a set ofrules such as traffic rules or driving rules 312, which may be stored inpersistent storage device 352.

Based on a decision for each of the objects perceived, planning module305 plans a path or route for the autonomous vehicle, as well as drivingparameters (e.g., distance, speed, and/or turning angle). That is, for agiven object, decision module 304 decides what to do with the object,while planning module 305 determines how to do it. For example, for agiven object, decision module 304 may decide to pass the object, whileplanning module 305 may determine whether to pass on the left side orright side of the object. Planning and control data is generated byplanning module 305 including information describing how vehicle 300would move in a next moving cycle (e.g., next route/path segment). Forexample, the planning and control data may instruct vehicle 300 to move10 meters at a speed of 30 mile per hour (mph), then change to a rightlane at the speed of 25 mph.

Based on the planning and control data, control module 306 controls anddrives the autonomous vehicle, by sending proper commands or signals tovehicle control system 111, according to a route or path defined by theplanning and control data. The planning and control data includesufficient information to drive the vehicle from a first point to asecond point of a route or path using appropriate vehicle settings ordriving parameters (e.g., throttle, braking, and turning commands) atdifferent points in time along the path or route.

In one embodiment, the planning phase is performed in a number ofplanning cycles, also referred to as command cycles, such as, forexample, in every time interval of 100 milliseconds (ms). For each ofthe planning cycles or command cycles, one or more control commands willbe issued based on the planning and control data. That is, for every 100ms, planning module 305 plans a next route segment or path segment, forexample, including a target position and the time required for the ADVto reach the target position. Alternatively, planning module 305 mayfurther specify the specific speed, direction, and/or steering angle,etc. In one embodiment, planning module 305 plans a route segment orpath segment for the next predetermined period of time such as 5seconds. For each planning cycle, planning module 305 plans a targetposition for the current cycle (e.g., next 5 seconds) based on a targetposition planned in a previous cycle. Control module 306 then generatesone or more control commands (e.g., throttle, brake, steering controlcommands) based on the planning and control data of the current cycle.

Note that decision module 304 and planning module 305 may be integratedas an integrated module. Decision module 304/planning module 305 mayinclude a navigation system or functionalities of a navigation system todetermine a driving path for the autonomous vehicle. For example, thenavigation system may determine a series of speeds and directionalheadings to effect movement of the autonomous vehicle along a path thatsubstantially avoids perceived obstacles while generally advancing theautonomous vehicle along a roadway-based path leading to an ultimatedestination. The destination may be set according to user inputs viauser interface system 113. The navigation system may update the drivingpath dynamically while the autonomous vehicle is in operation. Thenavigation system can incorporate data from a GPS system and one or moremaps so as to determine the driving path for the autonomous vehicle.

Decision module 304/planning module 305 may further include a collisionavoidance system or functionalities of a collision avoidance system toidentify, evaluate, and avoid or otherwise negotiate potential obstaclesin the environment of the autonomous vehicle. For example, the collisionavoidance system may effect changes in the navigation of the autonomousvehicle by operating one or more subsystems in control system 111 toundertake swerving maneuvers, turning maneuvers, braking maneuvers, etc.The collision avoidance system may automatically determine feasibleobstacle avoidance maneuvers on the basis of surrounding trafficpatterns, road conditions, etc. The collision avoidance system may beconfigured such that a swerving maneuver is not undertaken when othersensor systems detect vehicles, construction barriers, etc. in theregion adjacent the autonomous vehicle that would be swerved into. Thecollision avoidance system may automatically select the maneuver that isboth available and maximizes safety of occupants of the autonomousvehicle. The collision avoidance system may select an avoidance maneuverpredicted to cause the least amount of acceleration in a passenger cabinof the autonomous vehicle.

Routing module 307 can generate reference routes, for example, from mapinformation such as information of road segments, vehicular lanes ofroad segments, and distances from lanes to curb. For example, a road canbe divided into sections or segments {A, B, and C} to denote three roadsegments. Three lanes of road segment A can be enumerated {A1, A2, andA3}. A reference route is generated by generating reference points alongthe reference route. For example, for a vehicular lane, routing module307 can connect midpoints of two opposing curbs or extremities of thevehicular lane provided by a map data. Based on the midpoints andmachine learning data representing collected data points of vehiclespreviously driven on the vehicular lane at different points in time,routing module 307 can calculate the reference points by selecting asubset of the collected data points within a predetermined proximity ofthe vehicular lane and applying a smoothing function to the midpoints inview of the subset of collected data points.

Based on reference points or lane reference points, routing module 307may generate a reference line by interpolating the reference points suchthat the generated reference line is used as a reference line forcontrolling ADVs on the vehicular lane. In some embodiments, a referencepoints table and a road segments table representing the reference linesare downloaded in real-time to ADVs such that the ADVs can generatereference lines based on the ADVs' geographical location and drivingdirection. For example, in one embodiment, an ADV can generate areference line by requesting routing service for a path segment by apath segment identifier representing an upcoming road section aheadand/or based on the ADV's GPS location. Based on a path segmentidentifier, a routing service can return to the ADV reference pointstable containing reference points for all lanes of road segments ofinterest. ADV can look up reference points for a lane for a path segmentto generate a reference line for controlling the ADV on the vehicularlane.

As described above, route or routing module 307 manages any data relatedto a trip or route of a user. The user of the ADV specifies a startingand a destination location to obtain trip related data. Trip relateddata includes route segments and a reference line or reference points ofthe route segment. For example, based on route map info 311, routemodule 307 generates a route or road segments table and a referencepoints table. The reference points are in relations to road segmentsand/or lanes in the road segments table. The reference points can beinterpolated to form one or more reference lines to control the ADV. Thereference points can be specific to road segments and/or specific lanesof road segments.

For example, a road segments table can be a name-value pair to includeprevious and next road lanes for road segments A-D. E.g., a roadsegments table may be: {(A1, B1), (B1, C1), (C1, D1)} for road segmentsA-D having lane 1. A reference points table may include reference pointsin x-y coordinates for road segments lanes, e.g., {(A1, (x1, y1)), (B1,(x2, y2)), (C1, (x3, y3)), (D1, (x4, y4))}, where A1 . . . D1 refers tolane 1 of road segments A-D, and (x1, y1) . . . (x4, y4) arecorresponding real world coordinates. In one embodiment, road segmentsand/or lanes are divided into a predetermined length such asapproximately 200 meters segments/lanes. In another embodiment, roadsegments and/or lanes are divided into variable length segments/lanesdepending on road conditions such as road curvatures. In someembodiments, each road segment and/or lane can include several referencepoints. In some embodiments, reference points can be converted to othercoordinate systems, e.g., latitude-longitude.

In some embodiments, reference points can be converted into a relativecoordinates system, such as station-lateral (SL) coordinates. Astation-lateral coordinate system is a coordinate system that referencesa fixed reference point to follow a reference line. For example, a (S,L)=(1, 0) coordinate can denote one meter ahead of a stationary point(i.e., the reference point) on the reference line with zero meterlateral offset. A (S, L)=(2, 1) reference point can denote two metersahead of the stationary reference point along the reference line and anone meter lateral offset from the reference line, e.g., offset to theleft by one meter.

In one embodiment, decision module 304 generates a rough path profilebased on a reference line provided by routing module 307 and based onobstacles perceived by the ADV, surrounding the ADV. The rough pathprofile can be a part of path/speed profiles 313 which may be stored inpersistent storage device 352. The rough path profile is generated byselecting points from the reference line. For each of the points,decision module 304 moves the point to the left or right (e.g.,candidate movements) of the reference line based on one or more obstacledecisions on how to encounter the object, while the rest of pointsremain steady. The candidate movements are performed iteratively usingdynamic programming to path candidates in search of a path candidatewith a lowest path cost using cost functions, as part of costs functions315 of FIG. 3A, thereby generating a rough path profile. Examples ofcost functions include costs based on: a curvature of a route path, adistance from the ADV to perceived obstacles, and a distance of the ADVto the reference line. In one embodiment, the generated rough pathprofile includes a station-lateral map, as part of SL maps/ST graphs 314which may be stored in persistent storage devices 352.

In one embodiment, decision module 304 generates a rough speed profile(as part of path/speed profiles 313) based on the generated rough pathprofile. The rough speed profile indicates the best speed at aparticular point in time controlling the ADV. Similar to the rough pathprofile, candidate speeds at different points in time are iterated usingdynamic programming to find speed candidates (e.g., speed up or slowdown) with a lowest speed cost based on cost functions, as part of costsfunctions 315 of FIG. 3A, in view of obstacles perceived by the ADV. Therough speed profile decides whether the ADV should overtake or avoid anobstacle, and to the left or right of the obstacle. In one embodiment,the rough speed profile includes a station-time (ST) graph (as part ofSL maps/ST graphs 314). Station-time graph indicates a distancetravelled with respect to time.

In one embodiment, planning module 305 recalculates the rough pathprofile in view of obstacle decisions and/or artificial barriers toforbid the planning module 305 to search the geometric spaces of thebarriers. For example, if the rough speed profile determined to nudge anobstacle from the left, planning module 305 can set a barrier (in theform of an obstacle) to the right of the obstacle to prevent acalculation for the ADV to nudge an obstacle from the right. In oneembodiment, the rough path profile is recalculated by optimizing a pathcost function (as part of cost functions 315) using quadraticprogramming (QP). In one embodiment, the recalculated rough path profileincludes a station-lateral map (as part of SL maps/ST graphs 314).

In one embodiment, planning module 305 recalculates the rough speedprofile using quadratic programming (QP) to optimize a speed costfunction (as part of cost functions 315). Similar speed barrierconstraints can be added to forbid the QP solver to search for someforbidden speeds. In one embodiment, the recalculated rough speedprofile includes a station-time graph (as part of SL maps/ST graphs314).

Note that some or all of the components as shown and described above maybe implemented in software, hardware, or a combination thereof. Forexample, such components can be implemented as software installed andstored in a persistent storage device, which can be loaded and executedin a memory by a processor (not shown) to carry out the processes oroperations described throughout this application. Alternatively, suchcomponents can be implemented as executable code programmed or embeddedinto dedicated hardware such as an integrated circuit (e.g., anapplication specific IC or ASIC), a digital signal processor (DSP), or afield programmable gate array (FPGA), which can be accessed via acorresponding driver and/or operating system from an application.Furthermore, such components can be implemented as specific hardwarelogic in a processor or processor core as part of an instruction setaccessible by a software component via one or more specificinstructions.

FIG. 4 is a block diagram illustrating an example of a decision andplanning process according to one embodiment. FIG. 5A is a block diagramillustrating an example of a decision module according to oneembodiment. FIG. 5B is a block diagram illustrating an example of aplanning module according to one embodiment. Referring to FIG. 4,Decision and planning process 400 includes routing module 307,localization/perception data 401, path decision process 403, speeddecision process 405, path planning process 407, speed planning process409, aggregator 411, and trajectory calculator 413.

Path decision process 403 and speed decision process 405 may beperformed respectively by a path decision module 501 and a speeddecision module 503 of decision module 304 in FIG. 5A. Referring to FIG.4 and FIG. 5A, path decision process 403 or path decision module 501includes path state machine 505, path traffic rules 507, andstation-lateral maps generator 509. Path decision process 403 or pathdecision module 501 can generate a rough path profile as an initialconstraint for the path/speed planning processes 407 and 409 usingdynamic programming. In one embodiment, path state machine 505 includesat least three states: cruising, changing lane, and idle states. Pathstate machine 505 provides previous planning results and importantinformation such as whether the ADV is cruising or changing lanes. Pathtraffic rules 507, as part of driving/traffic rules 312 of FIG. 3A,include traffic rules that can affect the outcome of a path decisionsmodule. For example, path traffic rules 507 can include trafficinformation such as construction traffic signs thereby the ADV can avoidlanes with such construction signs. From the states, traffic rules,reference line provided by routing module 307, and obstacles perceivedby the ADV, path decision process 403 can decide how the perceivedobstacles are handled (i.e., ignore, overtake, yield, stop, pass), aspart of a rough path profile.

For example, in one embedment, the rough path profile is generated by acost function consisting of costs based on: a curvature of path and adistance from the reference line and/or reference points to obstacles.Points on the reference line are selected and are moved to the left orright of the reference lines as candidate movements representing pathcandidates. Each of the candidate movements has an associated cost. Theassociated costs for candidate movements of one or more points on thereference line can be solved using dynamic programming for an optimalcost sequentially, one point at a time. In one embodiment, SL mapsgenerator 509 generates a station-lateral map as part of the rough pathprofile. A station-lateral map is a two-dimensional geometric map(similar to an x-y coordinate plane) that includes obstacles informationperceived by the ADV. From the SL map, path decision process 403 can layout an ADV path that follows the obstacle decisions. Dynamic programming(or dynamic optimization) is a mathematical optimization method thatbreaks down a problem to be solved into a sequence of value functions,solving each of these value functions just once and storing theirsolutions. The next time the same value function occurs, the previouscomputed solution is simply looked up saving computation time instead ofrecomputing its solution.

Speed decision process 405 or speed decision module 503 includes speedstate machine 511, speed traffic rules 513, and station-time graphsgenerator 515. Speed decision process 405 or speed decision module 503can generate a rough speed profile as an initial constraint for thepath/speed planning processes 407 and 409 using dynamic programming. Inone embodiment, speed state machine 511 includes at least two states:speed up, or slow down. Speed traffic rules 513, as part ofdriving/traffic rules 312 of FIG. 3A, include traffic rules that canaffect the outcome of a speed decisions module. For example, speedtraffic rules 513 can include traffic information such as red/greentraffic lights, another vehicle in a crossing route, etc. From a stateof the speed state machine, speed traffic rules, rough path profile/SLmap generated by decision process 403, and perceived obstacles, speeddecision process 405 can generate a rough speed profile to control whento speed up and/or slow down the ADV. Station-time graphs generator 515can generate a station-time graph as part of the rough speed profile.

Referring to FIG. 4 and FIG. 5B, path planning process 407 or pathplanning module 521 includes station-lateral maps 525, geometry smoother527, and path costs module 529. Station-lateral maps 525 can include thestation-lateral maps generated by SL maps generator 509 of path decisionprocess 403. Path planning process 407 or path planning module 521 canuse a rough path profile (e.g., a station-lateral map) as the initialconstraint to recalculate an optimal reference line using quadraticprogramming. Quadratic programming involves minimizing or maximizing anobjective function (e.g., a quadratic function with several variables)subject to bounds, linear equality, and inequality constraints. Onedifference between dynamic programming and quadratic programming is thatquadratic programming optimizes all candidate movements for all pointson the reference line at once. Geometry smoother 527 can apply asmoothing algorithm (such as B-spline or regression) to the outputstation-lateral map. Path costs module 529 can recalculate a referenceline with a path cost function, as part of cost functions 315 of FIG.3A, to optimize a total cost for candidate movements for referencepoints, for example, using QP optimization performed by QP module 540.For example, in one embodiment, a total path cost function can be:

pathcost=Σ_(points)(heading)²+Σ_(points)(curvature)²+Σ_(points)(distance)²,

where the path costs are summed over all points on the reference line,heading denotes a difference in radial angles (e.g., directions) betweenthe point with respect to the reference line, curvature denotes adifference between curvature of a curve formed by these points withrespect to the reference line for that point, and distance denotes alateral (perpendicular to the direction of the reference line) distancefrom the point to the reference line. In some embodiments, distance isthe distance from the point to a destination location or an intermediatepoint of the reference line. In another embodiment, the curvature costis a change between curvature values of the curve formed at adjacentpoints. Note the points on the reference line can be selected as pointswith equal distances from adjacent points. Based on the path cost, pathcosts module 529 can recalculate a reference line by minimizing the pathcost using quadratic programming optimization, for example, by QP module540.

Speed planning process 409 or speed planning module 523 includesstation-time graphs 531, sequence smoother 533, and speed costs module535. Station-time graphs 531 can include the station-time (ST) graphgenerated by ST graphs generator 515 of speed decision process 405.Speed planning process or speed planning module 523 can use a roughspeed profile (e.g., a station-time graph) and results from pathplanning process 407 as initial constraints to calculate an optimalstation-time curve. Sequence smoother 533 can apply a smoothingalgorithm (such as B-spline or regression) to the time sequence ofpoints. Speed costs module 535 can recalculate the ST graph with a speedcost function, as part of cost functions 315 of FIG. 3A, to optimize atotal cost for movement candidates (e.g., speed up/slow down) atdifferent points in time. For example, in one embodiment, a total speedcost function can be:

speed cost=Σ_(points)(speed′)²+Σ_(points)(speed″)²+(distance)²,

where the speeds cost are summed over all time progression points,speed′ denotes an acceleration value or a cost to change speed betweentwo adjacent points, speed″ denotes a jerk value, or a derivative of theacceleration value or a cost to change a change of speed between twoadjacent points, and distance denotes a distance from the ST point tothe destination location. Here, speed costs module 535 calculates astation-time graph by minimizing the speed cost using quadraticprogramming optimization, for example, by QP module 540.

Aggregator 411 performs the function of aggregating the path and speedplanning results. For example, in one embodiment, aggregator 411 cancombine the two-dimensional ST graph and SL map into a three-dimensionalSLT graph. In another embodiment, aggregator 411 can interpolate (orfill in additional points) based on 2 consecutive points on a SLreference line or ST curve. In another embodiment, aggregator 411 cantranslate reference points from (S, L) coordinates to (x, y)coordinates. Trajectory generator 413 can calculate the final trajectoryto control the ADV. For example, based on the SLT graph provided byaggregator 411, trajectory generator 413 calculates a list of (x, y, T)points indicating at what time should the ADC pass a particular (x, y)coordinate.

Thus, referring back to FIG. 4, path decision process 403 and speeddecision process 405 are to generate a rough path profile and a roughspeed profile taking into consideration obstacles and/or trafficconditions. Given all the path and speed decisions regarding theobstacles, path planning process 407 and speed planning process 409 areto optimize the rough path profile and the rough speed profile in viewof the obstacles using QP programming to generate an optimal trajectorywith minimum path cost and/or speed cost. In another embodiment, pathcosts and speed costs can be calculated by path cost module 1110 andspeed cost module 1120 of FIGS. 12A-12B as described further below.

FIG. 6 is a block diagram illustrating a station-lateral map accordingto one embodiment. Referring to FIG. 6, map 600 has an S horizontalaxis, or station, and an L vertical axis, or lateral. As describedabove, station-lateral coordinates is a relative geometric coordinatesystem that references a particular stationary point on a reference lineand follows the reference line. For example, a (S, L) =(1, 0) coordinatecan denote one meter ahead of a stationary point (i.e., a referencepoint) on the reference line with zero meter lateral offset. A (S,L)=(2, 1) reference point can denote two meters ahead of the stationaryreference point along the reference line and an one meter perpendicularlateral offset from the reference line, e.g., a left offset.

Referring to FIG. 6, map 600 includes reference line 601 and obstacles603-609 perceived by an ADV. In one embodiment, obstacles 603-609 may beperceived by a RADAR or LIDAR unit of the ADV in a different coordinatesystem and translated to the SL coordinate system. In anotherembodiment, obstacles 603-609 may be artificial formed barriers asconstraints so the decision and planning modules would not search in theconstrained geometric spaces. In this example, a path decision modulesuch as path decision module 501 can generate decisions for each ofobstacles 603-609 such as decisions to avoid obstacles 603-608 and nudge(approach very closely) obstacle 609 (i.e., these obstacles may be othercars, buildings and/or structures). A path planning module such as pathplanning module 521 can then recalculate or optimize reference line 601based on a path cost in view of obstacles 603-609 using QP programmingto fine tune reference line 601 with the minimum overall cost asdescribed above. In this example, ADV 101 nudges, or approaches veryclose, for obstacle 609 from the left of obstacle 609.

FIGS. 7A and 7B are block diagrams illustrating station-time mapsaccording to some embodiments. Referring to FIG. 7A, graph 700 has astation (or S) vertical axis and a time (or T) horizontal axis. Graph700 includes curve 701, and obstacles 703-707. As described above, curve701 on station-time graph indicates, at what time and how far away isthe ADV from a station point. For example, a (T, S)=(10000, 150) candenote in 10000 milliseconds, an ADV would be 150 meters from thestationary point (i.e., a reference point). In this example, obstacle703 may be a building/structure to be avoided and obstacle 707 may be anartificial barrier corresponding to a decision to overtake a movingvehicle.

Referring to FIG. 7B, in this scenario, artificial barrier 705 is addedto the ST graph 710 as a constraint. The artificial barrier can beexamples of a red light or a pedestrian in the pathway that is at adistance approximately S2 from the station reference point, as perceivedby the ADV. Barrier 705 corresponds to a decision to “stop” the ADVuntil the artificial barrier is removed at a later time (i.e., thetraffic light changes from red to green, or a pedestrian is no longer inthe pathway).

FIG. 8 is a flow diagram illustrating a method according to oneembodiment. Processing 800 may be performed by processing logic whichmay include software, hardware, or a combination thereof. For example,process 800 may be performed by perception and planning system 110 of anautonomous vehicle. Referring to FIG. 8, at block 801, processing logiccalculates a first trajectory based on a map and a route information. Atblock 802, processing logic generates a path profile based on the firsttrajectory, traffic rules, and an obstacle information describing one ormore obstacles perceived by the ADV. At block 803, processing logicgenerates a speed profile based on the path profile, where the speedprofile includes, for each of the obstacles, a decision to yield orovertake the obstacle. At block 804, processing logic performs aquadratic programming optimization on the path profile and the speedprofile to identify an optimal path with optimal speeds. Quadraticprogramming optimization can be performed using respective path, speed,and/or obstacle cost functions to determine the most optimal route withthe minimum total cost. At block 805, processing logic generates asecond trajectory based on the optimal path and optimal speeds tocontrol the ADV autonomously according to the second trajectory.

In one embodiment, the path profile and the speed profile are generatediteratively using dynamic programming. In one embodiment, the pathprofile includes, for each encountered obstacle decisions, a decision toavoid, yield, ignore, or nudge to a left or a right side of theencountered obstacle.

In one embodiment, performing a quadratic programming optimization onthe path profile and the speed profile includes optimizing a first costfunction (e.g., path cost function(s)) using quadratic programming togenerate a station-lateral map based on the path profile, and optimizinga second cost function (e.g., speed cost function(s)) using quadraticprogramming to generate a station-time graph based on the speed profile.In another embodiment, the station-lateral map is generated by formingone or more barriers based on one or more obstacle decisions. In anotherembodiment, the first cost function includes a heading, a curvature,and/or a distance costs. In another embodiment, the second cost functionincludes an acceleration, a jerk, and/or a distance costs. In anotherembodiment, processing logic further interpolates a number of points tothe second trajectory that are absent from the first trajectory based onthe station-lateral map and the station-time graph.

FIG. 9 is a block diagram illustrating an example of a planning moduleaccording to one embodiment. Planning module 901 is similar to planningmodule 305 of FIG. 5B. In addition, planning module 901 includesgradient descent module 903. Gradient descent module 903 can perform agradient descent optimization method to optimize a cost function. Forexample, in one embodiment, gradient descent module 903 performsgradient descent optimization for a path cost function similar to thepath cost function as described above, replacing the quadraticprogramming optimization performed by path costs module 529. In anotherembodiment, gradient descent module 903 performs gradient descentoptimization for a speed cost function similar to the speed costfunction as described above, replacing the quadratic programmingoptimization performed by speed costs module 535. Gradient descent is afirst order iterative optimization algorithm for finding the minimum ofa function. To find a local minimum of a function using gradientdescent, an algorithm takes a step proportional to the negative of thegradient of the function at the current point. The algorithm cancalculate the differentials (i.e., gradients) of the cost function atthe current value and take a step proportional to the differential, andrepeat until a minimum point is reached.

FIG. 10 is a flow diagram illustrating a method according to oneembodiment. Processing 1000 may be performed by processing logic whichmay include software, hardware, or a combination thereof. For example,process 1000 may be performed by perception and planning system 110 ofan autonomous vehicle. Referring to FIG. 10, at block 1001, processinglogic calculates a first trajectory based on a map and a routeinformation. At block 1002, processing logic generates a path profilebased on the first trajectory, traffic rules, and an obstacleinformation describing one or more obstacles perceived by the ADV, wherefor each of the obstacles, the path profile includes a decision to nudgeor yield to left or right of the obstacle. At block 1003, processinglogic generates a speed profile based on the path profile in view of thetraffic rules. At block 1004, processing logic performs a gradientdescent optimization based on the path profile and the speed profile togenerate a second trajectory representing an optimized first trajectory.Quadratic programming optimization can be performed using respectivepath, speed, and/or obstacle cost functions to determine the mostoptimal route with the minimum total cost. At block 1005, processinglogic controls the ADV according to the second trajectory.

In one embodiment, the path profile and the speed profile are generatediteratively using dynamic programming. In one embodiment, the speedprofile includes, for each encountered obstacle of the obstacleinformation, a decision to follow, overtake, yield, stop, or pass theencountered obstacle.

In one embodiment, performing a gradient descent optimization based onthe path profile and the speed profile includes optimizing a first and asecond cost functions using the gradient descent optimization togenerate a station-lateral map and a station-time graph based on thepath profile and the speed profile respectively, and generating thesecond trajectory based on the station-lateral map and the station-timegraph to control the ADV according to the second trajectory. In anotherembodiment, the station-lateral map is generated by forming one or morebarriers based on one or more obstacle decisions. In another embodiment,the first and the second cost functions includes a heading, a curvature,and a distance, an acceleration, and a jerk costs. In anotherembodiment, processing logic further interpolates a number of points ofthe second trajectory that are absent from the first trajectory based onthe station-lateral map and the station-time graph.

In one embodiment, a planning module can determine all possible and/orlikely decisions for routing the ADV from a start to an end location inview of obstacles encountered by an ADV. Without initial constraints,planning module 1100 optimizes every possible trajectories based onreference lines provided by routing module 307 in view of possibleand/or likely obstacle decisions (i.e., avoid, overtake, pass, yield,nudge, stop, ignore) and calculates a minimum total cost for each of thepossible trajectories. For example, for a red traffic light obstacle inthe vehicular lane, although other obstacle decisions are possible, thelikely decision will be to stop the ADV. Planning module 1100 thenselects the trajectory with the lowest total cost to control the ADV.FIG. 11 is a block diagram illustrating an example of a planning moduleaccording to one embodiment. FIGS. 12A and 12B are block diagramsillustrating a path costs module and a speed costs module respectivelyaccording to one embodiment.

Referring to FIG. 11, planning module 1100 is similar to planning module305 of FIG. 5B. Planning module 1100 includes obstacle planning module1101, path cost module 1110, and speed cost module 1120. Obstacleplanning module 1101 includes obstacle cost calculator 1103. Obstacleplanning module 1101 plans how an ADV is controlled in view of anobstacle. Obstacle cost calculator 1103 can calculate obstacle costs foreach obstacle perceived by the ADV. The obstacle cost can represent acost to avoid a collision between an obstacle and the particulartrajectory being calculated. For example, a cost to avoid a collisionbetween an obstacle and the trajectory can includes a cost based on adistance (“distance cost”) between the nearest point of the trajectoryand the obstacle and a cost for a passing speed (“cost for passingspeed”) estimated to pass the obstacle.

In one embodiment, when the distance between the trajectory and theobstacle is greater than a threshold value, such as two meters, thedistance cost can be ignored. In one embodiment, the distance cost is anexponential function. For example, the distance cost can be:w₁*exp^((2-x))−1, where w₁ is a weight factor and x is the distancebetween the trajectory and the obstacle. In one embodiment, the cost forpassing speed is a logarithmic function. For example, the cost forpassing speed can be: w₂*log(speed, 4), where w₂ is a weight factor andspeed is the relative speed of the ADV with reference to the passingobstacle. In one embodiment, the total obstacle cost is calculated basedon the distance cost and the cost for passing speed, e.g., a product oftwo costs: (w₁*exp^((2-x))−1)*(w₂*log(speed, 4)).

Path cost module 1110 is similar to path cost module 529 of FIG. 5B.Referring to FIG. 12A, path cost module 1110 includes curvature costcalculator 1201, delta curvature cost calculator 1203, and lengthforward cost calculator 1205. Curvature cost calculator 1201 calculatesa curvature cost based on a curvature of each point along thetrajectory. In one embodiment, a curvature cost is an exponentialfunction. For example, the curvature cost can be w₃*exp(100*c)−1, wherew₃ is a weighting factor, and c is a curvature typically ranging from[0, 0.2]. Delta curvature cost calculator 1203 can calculate a deltacurvature cost based on a difference of curvatures between two adjacentpoints of the trajectory being calculated. In one embodiment, deltacurvature cost is an exponential function. For example, the deltacurvature cost can be w₄*exp(100*c′)−1, where w₄ is a weighting factor,and c′ is a change in curvature. Length forward cost calculator 1205 cancalculate a length forward cost representing a cost to move forwardtowards a reference line of the trajectory. In one embodiment, lengthforward cost is a linear function. For example, the length forward costcan be w₅*(X−x) where w₅ is a weighting factor, X is a distance todestination of the path segment and x is a distance travelled. In oneembodiment, path cost module 1110 can calculate a total path cost basedon a curvature cost, a delta curvature cost, and/or a length forwardcost of each point for all points along the trajectory being calculated.For example, the total path cost can be a summation of these three costsof each point for all points along the trajectory being calculated. Thepath cost can be optimized by quadratic programming and/or gradientdescent optimization as described above for a minimum path cost.

Speed cost module 1120 is similar to speed cost module 535 of FIG. 5B.Referring to FIG. 12B, speed cost module 1120 includes speed costcalculator 1207, delta speed cost calculator 1209, and delta delta speedcost calculator 1211. Speed cost calculator 1207 can calculate anindividual speed cost based on a speed in view of a speed limit at eachpoint. For example, in one embodiment, the cost function can be anabsolute value of the current route speed limit minus an ADV operatingspeed. The delta speed cost calculator 1209 can calculate a cost tochange speed between two adjacent points. The delta delta speed costcalculator 1211 can calculate a cost to change acceleration cost betweentwo adjacent points of the trajectory. In one embodiment, delta speedcost and delta delta speed cost are linear functions.

In another embodiment, delta speed cost and delta delta speed cost areconstants when the delta speed and delta delta speed is below or above apredetermined threshold value respectively. In one embodiment, speedcost module 1120 then calculates a total speed cost based on a speedcost, a delta speed cost, and/or a delta delta speed cost of each pointfor all points along the trajectory being calculated. For example, thetotal speed cost can be a summation of these three costs of each pointfor all points along a station-time curve being calculated. The totalspeed cost can be optimized by quadratic programming and/or gradientdescent optimization as described above for a minimum speed cost. Atrajectory can then be selected by planning module 1100 having acombined total minimum path and speed costs to control an ADVautonomously.

FIG. 13 is a flow diagram illustrating a method according to oneembodiment. Processing 1300 may be performed by processing logic whichmay include software, hardware, or a combination thereof. For example,process 1300 may be performed by perception and planning system 110 ofan autonomous vehicle. Referring to FIG. 13, at block 1301, processinglogic generates a number of possible decisions for routing the ADV froma first location to a second location based on perception informationperceiving a driving environment surrounding the ADV, including one ormore obstacles in view of a set of traffic rules. At block 1302,processing logic calculates a number of trajectories based on acombination of one or more of the possible decisions. At block 1303,processing logic calculates a total cost for each of the trajectoriesusing a number of cost functions. At block 1304, processing logicselects one of the trajectories with a minimum total cost as the drivingtrajectory to control the ADV autonomously.

FIG. 14A is a flow diagram illustrating a process of calculating a pathcost according to one embodiment. Process 1400 may be performed as apart of block 1303 of FIG. 13. Process 1400 may be performed byprocessing logic which may include software, hardware, or a combinationthereof. For example, process 1400 may be performed by path costs module1110 of an autonomous vehicle. Referring to FIG. 14A, at block 1401,processing logic calculates a curvature cost based on a curvature ofeach point along the trajectory. At block 1402, processing logiccalculates a delta curvature cost based on a difference of curvaturesbetween two adjacent points. At block 1403, processing logic calculatesa length forward cost representing a cost to move forward towards areference line of the trajectory. At block 1404, processing logiccalculates a total path cost based on the curvature cost, the deltacurvature cost, and the length forward cost.

FIG. 14B is a flow diagram illustrating a process of calculating a speedcost according to one embodiment. Process 1410 may be performed as apart of block 1303 of FIG. 13. Processing 1410 may be performed byprocessing logic which may include software, hardware, or a combinationthereof. For example, process 1410 may be performed by speed costsmodule 1120 of an autonomous vehicle. Referring to FIG. 14B, at block1411, processing logic calculates a speed cost based on a speed in viewof a speed limit at each point. At block 1412, processing logiccalculates a delta speed cost representing a cost to change speedbetween two adjacent points. At block 1413, processing logic calculatesa delta delta speed cost representing a cost to change a change of speedbetween two adjacent points. At block 1414, processing logic calculatesa total speed cost based on the speed cost, the delta speed cost, andthe delta delta speed cost.

In one embodiment, for each trajectory, processing logic furthercalculates a path cost using a path cost function representing a cost toroute the ADV from the first location to the second location accordingto the trajectory. Processing logic also calculates a speed costfunction representing a cost to control the ADV at different speedsalong the trajectory, where the total cost is calculated based on thepath cost and the speed cost.

In one embodiment, calculating a path cost using a path cost functionincludes calculating a curvature cost based on a curvature of each pointalong the trajectory and calculating a delta curvature cost based on adifference of curvatures between two adjacent points, where the pathcost is calculated based on the curvature costs and the delta curvaturecosts of all points along the trajectory. In another embodiment,processing logic further calculates a length forward cost representing acost to move forward towards a reference line of the trajectory, wherethe path cost is calculated further based on the length forward cost ofeach point.

In one embodiment, calculating a speed cost using a speed cost functionincludes calculating an individual speed cost based on a speed in viewof a speed limit at each point and calculating a delta speed costrepresenting a cost to change speed between two adjacent points, wherethe speed cost is calculated based on the individual speed costs and thedelta speed costs of all points along the trajectory. In anotherembodiment, processing logic further calculates an acceleration costbased on an acceleration of each point of the trajectory, where thespeed cost is calculated further based on the acceleration cost of eachpoint.

In one embodiment, processing logic further calculates an obstacle costfor each obstacle perceived, the obstacle cost representing a cost toavoid collision between the trajectory and the obstacle, where the totalcost is calculated further based on the obstacle cost. In anotherembodiment, calculating an obstacle cost includes calculating a minimumdistance between the trajectory and the obstacle and calculating apassing speed estimated to pass the obstacle, where the obstacle cost iscalculated based on the minimum distance and the passing speed.

FIG. 15 is a block diagram illustrating an example of a data processingsystem which may be used with one embodiment of the disclosure. Forexample, system 1500 may represent any of data processing systemsdescribed above performing any of the processes or methods describedabove, such as, for example, perception and planning system 110 or anyof servers 103-104 of FIG. 1. System 1500 can include many differentcomponents. These components can be implemented as integrated circuits(ICs), portions thereof, discrete electronic devices, or other modulesadapted to a circuit board such as a motherboard or add-in card of thecomputer system, or as components otherwise incorporated within achassis of the computer system.

Note also that system 1500 is intended to show a high level view of manycomponents of the computer system. However, it is to be understood thatadditional components may be present in certain implementations andfurthermore, different arrangement of the components shown may occur inother implementations. System 1500 may represent a desktop, a laptop, atablet, a server, a mobile phone, a media player, a personal digitalassistant (PDA), a Smartwatch, a personal communicator, a gaming device,a network router or hub, a wireless access point (AP) or repeater, aset-top box, or a combination thereof. Further, while only a singlemachine or system is illustrated, the term “machine” or “system” shallalso be taken to include any collection of machines or systems thatindividually or jointly execute a set (or multiple sets) of instructionsto perform any one or more of the methodologies discussed herein.

In one embodiment, system 1500 includes processor 1501, memory 1503, anddevices 1505-1508 connected via a bus or an interconnect 1510. Processor1501 may represent a single processor or multiple processors with asingle processor core or multiple processor cores included therein.Processor 1501 may represent one or more general-purpose processors suchas a microprocessor, a central processing unit (CPU), or the like. Moreparticularly, processor 1501 may be a complex instruction set computing(CISC) microprocessor, reduced instruction set computing (RISC)microprocessor, very long instruction word (VLIW) microprocessor, orprocessor implementing other instruction sets, or processorsimplementing a combination of instruction sets. Processor 1501 may alsobe one or more special-purpose processors such as an applicationspecific integrated circuit (ASIC), a cellular or baseband processor, afield programmable gate array (FPGA), a digital signal processor (DSP),a network processor, a graphics processor, a communications processor, acryptographic processor, a co-processor, an embedded processor, or anyother type of logic capable of processing instructions.

Processor 1501, which may be a low power multi-core processor socketsuch as an ultra-low voltage processor, may act as a main processingunit and central hub for communication with the various components ofthe system. Such processor can be implemented as a system on chip (SoC).Processor 1501 is configured to execute instructions for performing theoperations and steps discussed herein. System 1500 may further include agraphics interface that communicates with optional graphics subsystem1504, which may include a display controller, a graphics processor,and/or a display device.

Processor 1501 may communicate with memory 1503, which in one embodimentcan be implemented via multiple memory devices to provide for a givenamount of system memory. Memory 1503 may include one or more volatilestorage (or memory) devices such as random access memory (RAM), dynamicRAM (DRAM), synchronous DRAM (SDRAM), static RAM (SRAM), or other typesof storage devices. Memory 1503 may store information includingsequences of instructions that are executed by processor 1501, or anyother device. For example, executable code and/or data of a variety ofoperating systems, device drivers, firmware (e.g., input output basicsystem or BIOS), and/or applications can be loaded in memory 1503 andexecuted by processor 1501. An operating system can be any kind ofoperating systems, such as, for example, Robot Operating System (ROS),Windows® operating system from Microsoft®, Mac OS ®/iOS from Apple,Android® from Google®, LINUX, UNIX, or other real-time or embeddedoperating systems.

System 1500 may further include IO devices such as devices 1505-1508,including network interface device(s) 1505, optional input device(s)1506, and other optional IO device(s) 1507. Network interface device1505 may include a wireless transceiver and/or a network interface card(NIC). The wireless transceiver may be a WiFi transceiver, an infraredtransceiver, a Bluetooth transceiver, a WiMax transceiver, a wirelesscellular telephony transceiver, a satellite transceiver (e.g., a globalpositioning system (GPS) transceiver), or other radio frequency (RF)transceivers, or a combination thereof. The NIC may be an Ethernet card.

Input device(s) 1506 may include a mouse, a touch pad, a touch sensitivescreen (which may be integrated with display device 1504), a pointerdevice such as a stylus, and/or a keyboard (e.g., physical keyboard or avirtual keyboard displayed as part of a touch sensitive screen). Forexample, input device 1506 may include a touch screen controller coupledto a touch screen. The touch screen and touch screen controller can, forexample, detect contact and movement or break thereof using any of aplurality of touch sensitivity technologies, including but not limitedto capacitive, resistive, infrared, and surface acoustic wavetechnologies, as well as other proximity sensor arrays or other elementsfor determining one or more points of contact with the touch screen.

IO devices 1507 may include an audio device. An audio device may includea speaker and/or a microphone to facilitate voice-enabled functions,such as voice recognition, voice replication, digital recording, and/ortelephony functions. Other IO devices 1507 may further include universalserial bus (USB) port(s), parallel port(s), serial port(s), a printer, anetwork interface, a bus bridge (e.g., a PCI-PCI bridge), sensor(s)(e.g., a motion sensor such as an accelerometer, gyroscope, amagnetometer, a light sensor, compass, a proximity sensor, etc.), or acombination thereof. Devices 1507 may further include an imagingprocessing subsystem (e.g., a camera), which may include an opticalsensor, such as a charged coupled device (CCD) or a complementarymetal-oxide semiconductor (CMOS) optical sensor, utilized to facilitatecamera functions, such as recording photographs and video clips. Certainsensors may be coupled to interconnect 1510 via a sensor hub (notshown), while other devices such as a keyboard or thermal sensor may becontrolled by an embedded controller (not shown), dependent upon thespecific configuration or design of system 1500.

To provide for persistent storage of information such as data,applications, one or more operating systems and so forth, a mass storage(not shown) may also couple to processor 1501. In various embodiments,to enable a thinner and lighter system design as well as to improvesystem responsiveness, this mass storage may be implemented via a solidstate device (SSD). However in other embodiments, the mass storage mayprimarily be implemented using a hard disk drive (HDD) with a smalleramount of SSD storage to act as a SSD cache to enable non-volatilestorage of context state and other such information during power downevents so that a fast power up can occur on re-initiation of systemactivities. Also a flash device may be coupled to processor 1501, e.g.,via a serial peripheral interface (SPI). This flash device may providefor non-volatile storage of system software, including BIOS as well asother firmware of the system.

Storage device 1508 may include computer-accessible storage medium 1509(also known as a machine-readable storage medium or a computer-readablemedium) on which is stored one or more sets of instructions or software(e.g., module, unit, and/or logic 1528) embodying any one or more of themethodologies or functions described herein. Processingmodule/unit/logic 1528 may represent any of the components describedabove, such as, for example, decision module 304, planning module 305,control module 306 of FIGS. 3A and 3B, path decision module 501, speeddecision module 502 of FIG. 5A, and path planning module 521, speedplanning module 523 of FIG. 5B. Processing module/unit/logic 1528 mayalso reside, completely or at least partially, within memory 1503 and/orwithin processor 1501 during execution thereof by data processing system1500, memory 1503 and processor 1501 also constitutingmachine-accessible storage media. Processing module/unit/logic 1528 mayfurther be transmitted or received over a network via network interfacedevice 1505.

Computer-readable storage medium 1509 may also be used to store the somesoftware functionalities described above persistently. Whilecomputer-readable storage medium 1509 is shown in an exemplaryembodiment to be a single medium, the term “computer-readable storagemedium” should be taken to include a single medium or multiple media(e.g., a centralized or distributed database, and/or associated cachesand servers) that store the one or more sets of instructions. The terms“computer-readable storage medium” shall also be taken to include anymedium that is capable of storing or encoding a set of instructions forexecution by the machine and that cause the machine to perform any oneor more of the methodologies of the present disclosure. The term“computer-readable storage medium” shall accordingly be taken toinclude, but not be limited to, solid-state memories, and optical andmagnetic media, or any other non-transitory machine-readable medium.

Processing module/unit/logic 1528, components and other featuresdescribed herein can be implemented as discrete hardware components orintegrated in the functionality of hardware components such as ASICS,FPGAs, DSPs or similar devices. In addition, processingmodule/unit/logic 1528 can be implemented as firmware or functionalcircuitry within hardware devices. Further, processing module/unit/logic1528 can be implemented in any combination hardware devices and softwarecomponents.

Note that while system 1500 is illustrated with various components of adata processing system, it is not intended to represent any particulararchitecture or manner of interconnecting the components; as suchdetails are not germane to embodiments of the present disclosure. Itwill also be appreciated that network computers, handheld computers,mobile phones, servers, and/or other data processing systems which havefewer components or perhaps more components may also be used withembodiments of the disclosure.

Some portions of the preceding detailed descriptions have been presentedin terms of algorithms and symbolic representations of operations ondata bits within a computer memory. These algorithmic descriptions andrepresentations are the ways used by those skilled in the dataprocessing arts to most effectively convey the substance of their workto others skilled in the art. An algorithm is here, and generally,conceived to be a self-consistent sequence of operations leading to adesired result. The operations are those requiring physicalmanipulations of physical quantities.

It should be borne in mind, however, that all of these and similar termsare to be associated with the appropriate physical quantities and aremerely convenient labels applied to these quantities. Unlessspecifically stated otherwise as apparent from the above discussion, itis appreciated that throughout the description, discussions utilizingterms such as those set forth in the claims below, refer to the actionand processes of a computer system, or similar electronic computingdevice, that manipulates and transforms data represented as physical(electronic) quantities within the computer system's registers andmemories into other data similarly represented as physical quantitieswithin the computer system memories or registers or other suchinformation storage, transmission or display devices.

Embodiments of the disclosure also relate to an apparatus for performingthe operations herein. Such a computer program is stored in anon-transitory computer readable medium. A machine-readable mediumincludes any mechanism for storing information in a form readable by amachine (e.g., a computer). For example, a machine-readable (e.g.,computer-readable) medium includes a machine (e.g., a computer) readablestorage medium (e.g., read only memory (“ROM”), random access memory(“RAM”), magnetic disk storage media, optical storage media, flashmemory devices).

The processes or methods depicted in the preceding figures may beperformed by processing logic that comprises hardware (e.g. circuitry,dedicated logic, etc.), software (e.g., embodied on a non-transitorycomputer readable medium), or a combination of both. Although theprocesses or methods are described above in terms of some sequentialoperations, it should be appreciated that some of the operationsdescribed may be performed in a different order. Moreover, someoperations may be performed in parallel rather than sequentially.

Embodiments of the present disclosure are not described with referenceto any particular programming language. It will be appreciated that avariety of programming languages may be used to implement the teachingsof embodiments of the disclosure as described herein.

In the foregoing specification, embodiments of the disclosure have beendescribed with reference to specific exemplary embodiments thereof. Itwill be evident that various modifications may be made thereto withoutdeparting from the broader spirit and scope of the disclosure as setforth in the following claims. The specification and drawings are,accordingly, to be regarded in an illustrative sense rather than arestrictive sense.

What is claimed is:
 1. A computer-implemented method to generate adriving trajectory for an autonomous driving vehicle (ADV), the methodcomprising: calculating a first trajectory based on a map and a routeinformation; generating a path profile based on the first trajectory,traffic rules, and an obstacle information describing one or moreobstacles perceived by the ADV; generating a speed profile based on thepath profile, wherein the speed profile includes, for each of theobstacles, a decision to yield or overtake the obstacle; performing aquadratic programming optimization on the path profile and the speedprofile to identify an optimal path with optimal speeds; and generatinga second trajectory based on the optimal path profile and the optimalspeeds to control the ADV autonomously according to the secondtrajectory.
 2. The method of claim 1, wherein the path profile and thespeed profile are generated iteratively using dynamic programming. 3.The method of claim 1, wherein the path profile comprises, for eachencountered obstacle decisions, a decision to yield, ignore, or nudge toa left or a right side of the encountered obstacle.
 4. The method ofclaim 1, wherein performing a quadratic programming optimization on thepath profile and the speed profile comprises: optimizing a first costfunction using quadratic programming to generate a station-lateral mapbased on the path profile; and optimizing a second cost function usingquadratic programming to generate a station-time graph based on thespeed profile.
 5. The method of claim 4, wherein the station-lateral mapis generated by forming one or more barriers based on one or moreobstacle decisions.
 6. The method of claim 4, wherein the first costfunction comprises a heading, a curvature, and a distance costs.
 7. Themethod of claim 4, wherein the second cost function comprises anacceleration, a jerk, and a distance costs.
 8. The method of claim 4,further comprising interpolating a plurality of points to a secondtrajectory that are absent from the first trajectory based on thestation-lateral map and the station-time graph.
 9. A non-transitorymachine-readable medium having instructions stored therein, which whenexecuted by a processor, cause the processor to perform operations, theoperations comprising: calculating a first trajectory based on a map anda route information; generating a path profile based on the firsttrajectory, traffic rules, and an obstacle information describing one ormore obstacles perceived by the ADV; generating a speed profile based onthe path profile, wherein the speed profile includes, for each of theobstacles, a decision to yield or overtake the obstacle; performing aquadratic programming optimization on the path profile and the speedprofile to identify an optimal path with optimal speeds; and generatinga second trajectory based on the optimal path profile and the optimalspeeds to control the ADV autonomously according to the secondtrajectory.
 10. The non-transitory machine-readable medium of claim 9,wherein the path profile and the speed profile are generated iterativelyusing dynamic programming.
 11. The non-transitory machine-readablemedium of claim 9, wherein the path profile comprises, for eachencountered obstacle decisions, a decision to yield, ignore, or nudge toa left or a right side of the encountered obstacle.
 12. Thenon-transitory machine-readable medium of claim 9, wherein performing aquadratic programming optimization based on the path profile and thespeed profile comprises: optimizing a first cost function usingquadratic programming to generate a station-lateral map based on thepath profile; and optimizing a second cost function using quadraticprogramming to generate a station-time graph based on the speed profile.13. The non-transitory machine-readable medium of claim 12, wherein thestation-lateral map is generated by forming one or more barriers basedon one or more obstacle decisions.
 14. The non-transitorymachine-readable medium of claim 12, wherein the first cost functioncomprises a heading, a curvature, and a distance costs.
 15. Thenon-transitory machine-readable medium of claim 12, wherein the secondcost function comprises an acceleration, a jerk, and a distance costs.16. The non-transitory machine-readable medium of claim 12, furthercomprising interpolating a plurality of points to a second trajectorythat are absent from the first trajectory based on the station-lateralmap and the station-time graph.
 17. A data processing system,comprising: a processor; and a memory coupled to the processor to storeinstructions, which when executed by the processor, cause the processorto perform operations, the operations including calculating a firsttrajectory based on a map and a route information; generating a pathprofile based on the first trajectory, traffic rules, and an obstacleinformation describing one or more obstacles perceived by the ADV;generating a speed profile based on the path profile, wherein the speedprofile includes, for each of the obstacles, a decision to yield orovertake the obstacle; performing a quadratic programming optimizationon the path profile and the speed profile to identify an optimal pathwith optimal speeds; and generating a second trajectory based on theoptimal path profile and the optimal speeds to control the ADVautonomously according to the second trajectory.
 18. The system of claim17, wherein the path profile and the speed profile are generatediteratively using dynamic programming.
 19. The system of claim 17,wherein the path profile comprises, for each encountered obstacledecisions, a decision to yield, ignore, or nudge to a left or a rightside of the encountered obstacle.
 20. The system of claim 17, whereinperforming a quadratic programming optimization based on the pathprofile and the speed profile comprises: optimizing a first costfunction using quadratic programming to generate a station-lateral mapbased on the path profile; and optimizing a second cost function usingquadratic programming to generate a station-time graph based on thespeed profile.
 21. The system of claim 20, wherein the station-lateralmap is generated by forming one or more barriers based on one or moreobstacle decisions.